Skip to content

Improve corruption/maulwurf target selection and dice flow with UI highlights#21

Open
CosmicSlothOracle wants to merge 1 commit into
mainfrom
codex/fix-deployment-issues-during-build-6l7kd3
Open

Improve corruption/maulwurf target selection and dice flow with UI highlights#21
CosmicSlothOracle wants to merge 1 commit into
mainfrom
codex/fix-deployment-issues-during-build-6l7kd3

Conversation

@CosmicSlothOracle

Copy link
Copy Markdown
Owner

Motivation

  • Fix broken corruption flow where Maulwurf and corruption rolls were not wired to board clicks and the dice, causing no visual feedback or resolution when a player rolled.
  • Provide clear UI feedback which card is being targeted and show success/fail animations so players can see outcomes of corruption attempts.

Description

  • App wiring: added refs and event listeners in src/App.tsx to track pending abilities and selected target UIDs, listen for pc:corruption_target_selected / pc:maulwurf_select_target and forward pc:dice_result to the engine via pc:corruption_request_roll or pc:maulwurf_request_roll as appropriate.
  • Click handling: updated handleCardClick in src/App.tsx to allow clicking opponent government cards while a corruption ability is active, dispatch target selection events, and mark a target for a subsequent roll.
  • GameBoard UI: added corruptionTargetUid state and listeners in src/components/GameBoard.tsx, extended renderCard to add success/fail CSS classes (game-board__card--corruption-success / game-board__card--corruption-fail), and refined slot/card highlight logic so the board highlights selectable targets, the currently selected target, and shows outcome animations on resolution.
  • Small UX fixes: maintain and clear pending selection state on pc:clear_pending_selection / pc:corruption_resolved events and ensure Maulwurf auto-targeting is treated the same for UI highlighting.

Testing

  • Ran npm run build and the production build completed successfully (compiled successfully, build output generated). — Success.
  • Started the development server with BROWSER=none npm start and verified the app compiles and serves the UI (webpack compiled successfully). — Success.
  • Captured a visual smoke test screenshot by opening the running app with Playwright to verify corruption UI state and highlights render. — Success.

Codex Task

@netlify

netlify Bot commented Feb 1, 2026

Copy link
Copy Markdown

Deploy Preview for gleeful-bunny-c4efe6 ready!

Name Link
🔨 Latest commit 6e1d59a
🔍 Latest deploy log https://app.netlify.com/projects/gleeful-bunny-c4efe6/deploys/697ea5cdfdb207000841fe62
😎 Deploy Preview https://deploy-preview-21--gleeful-bunny-c4efe6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant